package com.jia.acl.controller;


import com.jia.acl.entity.Role;
import com.jia.acl.service.RoleService;
import com.jia.acl.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author dujiajia
 * @since 2021-02-03
 */
@RestController
@RequestMapping("/role")
public class RoleController {

    @Autowired
    RoleService roleService;

    @GetMapping("/list")
    public R list(){
        List<Role> list = roleService.list();
        return R.ok().data("data",list);
    }
}

